import request from '@/utils/request'
// 商品列表
export const getGoodsListApi = params => request('/goods', 'get', params)
// 根据商品id删除商品
export const deleteGoodsByIdApi = id => request(`/goods/${id}`, 'delete')

// 商品添加
export const addGoodsApi = data => request('/goods', 'post', data)

// 获取商品详情数据
export const getGoodsDetailApi = id => request(`/goods/${id}`, 'get')

// 编辑商品
export const editGoodsApi = data => request(`/goods/${data.goods_id}`, 'put', data)